home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Pascal / Utilities / Snippets / README More About MPW InForm < prev    next >
Encoding:
Text File  |  1991-08-10  |  7.2 KB  |  193 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        More About MPW InForm
  3. #
  4. #    Contains:    xxx put contents here xxx
  5. #
  6. #    Written by:    G. Sawitzki, StatLab Heidelberg
  7. #
  8. #    Copyright:    © 1991 by G. Sawitzki, Heidelberg, all rights reserved.
  9. #
  10. #    Change History (most recent first):
  11. #
  12. #         <2>      8/9/91    gs        add -a, -f options
  13. #         <1>      8/2/91    gs        first checked in
  14. #
  15. #    To Do:
  16. #
  17.  
  18. Input and output
  19. ================
  20.  
  21. InForm can operate on windows or files. These operations are not equivalent.
  22. If InForm operates on a file, the complete file will be processed. If InForm
  23. operates on a window, and there is a non-empty selection in the window, only
  24. the selection will be processed.
  25.  
  26. InForm is activated for a window if called in the form
  27.     InForm window
  28. e.g.
  29.     InForm "{active}"
  30. InForm restricts to active selections when operating on a window.
  31. InForm is activated to operate on a file if called in the form
  32.     InForm -from file
  33. e.g.
  34.     InForm -from MyFile.p
  35. When operating on files, InForm ignores selections.
  36.  
  37.  
  38. Pasmat control settings
  39. =======================
  40.  
  41. InForm honours several of the PasMat settings when included as a comment.
  42. In particular, the following options are honoured:
  43.     < not public so far >
  44.  
  45.  
  46. Cross-Referencing
  47. =================
  48.  
  49. Cross-Referencing is activated using the -cross option.
  50.  
  51.  
  52. Format Control
  53. =================
  54. Formats are controlled by templates. These templates are selected by the -f option.
  55. The default format corresponds to -f STD.
  56.  
  57. Abstract mode
  58. =============
  59.  
  60. Abstract mode is activated using the -a option. Abstracts are written to 
  61. standard output.
  62. Abstracts are controlled by templates. These templates are selected by the -a option.
  63. The default format corresponds to -f STD.
  64. Abstracts may include 
  65.     - all program or unit definition lines
  66.     - uses statements
  67.     - lines containing the keywords interface or implementation    
  68.     - lines containing the keyword object
  69.     - lines containing function or procedure definitions
  70.     - all lines identified as key comments.
  71.  
  72.  
  73.  
  74. Diagnostic mode
  75. ===============
  76.  
  77. Diagnostic mode is activated by the -p option. In diagnostic mode, inform will note
  78. all identified syntactical errors to diagnostic output.
  79.  
  80. Abstract mode preferences
  81. =========================
  82.  
  83. Abstract format is controlled by a resource of type StLA. The name of the resource is
  84. selected on the command line, using the -a options. Only uppercase letters are allowed.
  85. Abstract format allows to support "styles" for various parts of the components (e.g. 411 
  86. "Tags" or RTF style information)
  87. The use of the abstract formatting possibilities is still under development; 
  88. not all options are supported so far.
  89.  
  90. The general layout of a source file is viewed as:
  91.  
  92. {possibly some preamble here}
  93. <code start, e.g. Program...>
  94. <global declarations>
  95.     <a fixed number of empty lines (default:2) , or a fixed tag>
  96. {possibly a leading comment here}
  97. <procedure/function heading> {possibly a trailing comment here}
  98. {possibly a pending comment here}
  99. <implementation>
  100. ...
  101.  
  102. A preamble is a comment starting at the first position of the selection resp. file.
  103. A leading comment is a comment following a specific number of empty lines, or starting
  104. with a specific tag string.
  105. A trailing comment is a comment starting on a line containing code.
  106. A pending comment is a comment starting after an object function or procedure definition,
  107. with no intervening code.
  108.  
  109. Comments and code segments are started by a header and followed by a trailer.
  110.  
  111.  
  112.     Version                             HWRD    internal use. should be set to 1.
  113.     Preamble                            BOOL    include preamble
  114.     Leading Comments                    BOOL    ? include leading comments
  115.     Code                                BOOL    ? include code lines
  116.     Trailing Comments                   BOOL    ? include trailing comments
  117.     Pending Comments                    BOOL    ? include pending comments
  118.     Reserved05                          BOOL    ?
  119.     Reserved06                          BOOL    ?
  120.     interface/ global only              BOOL    do not include implementation and nested constructs
  121.     all global                          BOOL    include global const, types, vars
  122.     program segments                    BOOL    include program, interface, implementation statments
  123.     uses clause                         BOOL    include uses clause
  124.     include clause                      BOOL    ?  include $I clauses
  125.     "Make" format                       BOOL    •test
  126.     reserved31                          BOOL    ?
  127.     reserved32                          BOOL    ?
  128.     Indent leading comments             BOOL    ?
  129.     Indent pending comments             BOOL    ?
  130.     Remove comment brackets             BOOL    remove {} brackets from comments
  131.     reserved71                          BOOL    ?
  132.     reserved72                          BOOL    ?
  133.     Nr leading empty lines              DWRD    marker to trigger leading comments
  134.     Leading tag                         PSTR    ?
  135.     Preamble header                     PSTR    header text to insert before preamble
  136.     Preamble trailer                    PSTR    trailer text to insert after preamble
  137.     Code header                         PSTR    header text to insert before code
  138.     Code trailer                        PSTR    trailer text to insert after code
  139.     Leading comment header              PSTR    header text to insert before leading comment
  140.     Leading comment trailer             PSTR    trailer text to insert after leading comment
  141.     Pending comment header              PSTR    header text to insert before pending comment
  142.     Pending comment trailer             PSTR    trailer text to insert after pending comment
  143.     Trailing comment header             PSTR    header text to insert before trailing comment
  144.     Trailing comment trailer            PSTR    trailer text to insert after trailing comment
  145.  
  146.  
  147.  
  148. Format preferences
  149. ==================
  150.  
  151. Source format is controlled by a resource of type StLF. The name of the resource is
  152. selected on the command line, using the -f option. Only uppercase letters are allowed.
  153.  
  154. The use of the code formatting styles is still under development; 
  155. not all options are supported so far.
  156.  
  157.     version                             HWRD    internal use. should be set to 1
  158.     a: case bunching                    BOOL    ?
  159.     b: if bunching                      BOOL    ?
  160.     body                                BOOL    ?
  161.     PASMATc                             BOOL    ?
  162.     PASMATd                             BOOL    ?
  163.     e Capitalize identifiers            BOOL    ?
  164.     entab                               BOOL    ?
  165.     f disable formatting                BOOL    ?
  166.     group assignement                   BOOL    ?
  167.     h disable for,while,with bunching     BOOL    ?
  168.     ¿¿¿ i include directories           BOOL    ?
  169.     in: process include files           BOOL    ?
  170.     k: indent between begin/end         BOOL    ?
  171.     l literal copy                      BOOL    ?
  172.     list                                BOOL    ?
  173.     n: group formal parameters          BOOL    ?
  174.     o output line width                 DWRD    sets maximum output line width
  175.     p                                   BOOL    ?
  176.     pattern                             BOOL    ?
  177.     q ELSE IF special                   BOOL    ?
  178.     r reserved uppercase                BOOL    change all reserved words to uppercase
  179.     rec                                 BOOL    ?
  180.     s                                   BOOL    ?
  181.     t tab amount                        DWRD    set nr of spaces per tab
  182.     u rename on first occurence         BOOL    ?
  183.     v THEN on separate line             BOOL    ?
  184.     w identifiers uppercase             BOOL    ?
  185.     x suppress space around operators     BOOL    ?
  186.     y suppress space around :=          BOOL    ?
  187.     z suppress space after commas       BOOL    ?
  188.     : align colons in var definitions     BOOL    ?
  189.     @ force multiple case on separate lines     BOOL    ?
  190.     # smart grouping                    BOOL    ?
  191.     _ partability mode                  BOOL    ?
  192.  
  193.